<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>  
<head>  
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />  
<style type="text/css">  
#preview  
 {  
 width:200px;  
 height:200px;  
 }  
 img｛
  width:50px;  
 height:50px; 
 ｝
 #preview  
 {  
/* border:1px solid #000;   */
}  
 </style>  
  <%-- </head>  
<body>  
<div>
 <div id="preview" style="float:left;">
 <img src="${pageContext.request.contextPath}/img/iconfont-tianjia.png" class="" width="50px" height="50px" >
 </div> 
 </div> 
 <div id="preview" style="float:left;">
 <img src="${pageContext.request.contextPath}/img/iconfont-tianjia.png" class="" width="50px" height="50px" >
 </div> 
 <div id="preview" style="float:left;">
 <img src="${pageContext.request.contextPath}/img/iconfont-tianjia.png" class="" width="50px" height="50px" >
 </div> 
 </div>
 <div id="preview" style="float:left;">
 <img src="${pageContext.request.contextPath}/img/iconfont-tianjia.png" class="" width="50px" height="50px" >
 </div> 
 </div>
 </div>
<input type="file" onchange="preview(this)" value=""/>
 <script type="text/javascript">    
 function preview(file)  
 {  
 var prevDiv = document.getElementById('preview');  
 if (file.files && file.files[0])  
 {  
 var reader = new FileReader();  
 reader.onload = function(evt){  
 prevDiv.innerHTML = '<img src="' + evt.target.result + '" />';  
};    
 reader.readAsDataURL(file.files[0]);  
}  
/*  else    
 {  
 prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';  
 }   */
 }  
 </script>   --%>
  <script type="text/javascript" language="JavaScript">
    
    var startTime = new Date();
    var endTime=startTime.getTime()+10*60*1000;
    var g_blinkswitch = 0;
    var g_blinktitle = document.title;
    function getRemainTime(){
                    
        var nowTime = new Date();
        var nMS =endTime - nowTime.getTime();
        var nM=Math.floor(nMS/(1000*60)) % 60;
        var nS=Math.floor(nMS/1000) % 60;
        if(nM==0&&nS==0&&nMS<1000) //当倒计时结束
        {
            window.focus();
            setInterval("blinkNewMsg()", 1000);
            window.location.reload();
        }
        if(nS < 10) nS = "0" + nS;
           
        if(nMS >= 0){
            document.getElementById("remainTime").innerHTML= nM + "分" + nS + "秒";

            setTimeout("getRemainTime()",1000);
        }
        
    }
    
    function blinkNewMsg()
    {
        document.title = g_blinkswitch % 2==0 ? "【　　　】 - " + g_blinktitle : "【新消息】 - " +
        g_blinktitle;
        g_blinkswitch++;
    }
  
    
    window.onload=getRemainTime;
    
    </script>
</head>
<body>
<strong id="remainTime">10分00秒</strong>
 </body>  
 </html> 
